From 6dc6aaeaf1a4d852c7451c0d0e792f0eb086c8a3 Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Sun, 24 Feb 2008 17:51:22 +0000 Subject: [PATCH] Prevent hidden windows from being shown without gdk's control when 2008-02-24 Richard Hult * gdk/quartz/GdkQuartzWindow.c: Prevent hidden windows from being shown without gdk's control when clicking the dock icon. svn path=/trunk/; revision=19638 --- ChangeLog | 5 +++++ gdk/quartz/GdkQuartzWindow.c | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b13f6487da..69c6d360f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-24 Richard Hult + + * gdk/quartz/GdkQuartzWindow.c: Prevent hidden windows from being + shown without gdk's control when clicking the dock icon. + 2008-02-24 Richard Hult * gdk/quartz/gdkprivate-quartz.h: diff --git a/gdk/quartz/GdkQuartzWindow.c b/gdk/quartz/GdkQuartzWindow.c index 95cf028567..3f16815110 100644 --- a/gdk/quartz/GdkQuartzWindow.c +++ b/gdk/quartz/GdkQuartzWindow.c @@ -79,9 +79,18 @@ -(void)windowDidBecomeMain:(NSNotification *)aNotification { - GdkWindow *window; + GdkWindow *window = [[self contentView] gdkWindow]; + + if (![self isVisible]) + { + /* Note: This is a hack needed because for unknown reasons, hidden + * windows get shown when clicking the dock icon when the application + * is not already active. + */ + [self orderOut:nil]; + return; + } - window = [[self contentView] gdkWindow]; _gdk_quartz_window_did_become_main (window); } -- 2.30.2